#ifndef NCDGUI_IFLIST_H
#define NCDGUI_IFLIST_H

#include <gtk/gtk.h>

#include <structure/LinkedList1.h>

typedef struct {
    LinkedList1 entries_list;
    GtkListStore *store;
    GtkWidget *widget;
} IfList;

typedef struct {
    IfList *iflist;
    char *ifname;
    LinkedList1Node entries_list_node;
    GtkTreeIter iter;
} IfListEntry;

void IfList_Init (IfList *o);
void IfList_Free (IfList *o);
GtkWidget * IfList_Widget (IfList *o);

void IfListEntry_Init (IfListEntry *o, IfList *iflist, const char *ifname);
void IfListEntry_Free (IfListEntry *o);
void IfListEntry_SetData (IfListEntry *o, const char *type, int link_is_up, const char *addresses, const char *routes, const char *status, int is_inet);

#endif
